const router = require('express').Router();
var PW = require('png-word');   //生成图片验证码的
var pw = new PW();
var R = require('random-word');
const path = require("path");


router.get('/getcode', function(req, res){
  var r = new R("123456");
  req.session.vimg = r.random(3);
  pw.createReadStream(req.session.vimg).pipe(res);
  // pw.createReadStream('1224').pipe(res);
})


module.exports = router;
